package com.guohengspace.mq.controller;

import com.guohengspace.mq.common.ResponseResult;
import com.guohengspace.mq.model.query.EipBatchCreateParam;
import com.guohengspace.mq.service.EipService;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(tags = "弹性IP管理")
@RestController
@RequestMapping("/eip")
@Slf4j
public class EipController {

    @Autowired
    private EipService eipService;

    @Operation(tags = "弹性IP管理", summary = "批量添加弹性IP", description = "批量添加弹性IP")
    @PostMapping("/batchCreate")
    public ResponseResult batchCreate(@RequestBody EipBatchCreateParam eipBatchCreateParam) {
        ResponseResult responseResult = eipService.batchCreate(eipBatchCreateParam);
        return responseResult;
    }

    @Operation(tags = "弹性IP管理", summary = "获取弹性IP配置", description = "获取弹性IP配置")
    @GetMapping("/config")
    public ResponseResult config() {
        ResponseResult responseResult = eipService.config();
        return responseResult;
    }

}